import matplotlib.pyplot as plt
def readNum(path,count):
    f =open(path)
    f.seek(0)
    lines = f.readlines()
    for line in lines:
        cur=line.split(' ')[0]

        if cur in count:
            count[cur]+=1
        else:
            count[cur]=1

    f.close()

count = {}
readNum('./LstImp',count)
readNum('./LstTestEvaluation',count)
readNum('./LstTestValidation',count)
readNum('./LstTrain',count)
#sorted(count)
cnt=0
for i in count:
    cnt+=count[i]
print(cnt)
count=sorted(count.items(),key=lambda kv:kv[1],reverse=True)
count=dict(count)
# plt.bar(count.keys(),count.values())
# plt.show()
#print(count)
